package com.zhentao.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;

/**
 * 预测模型参数配置表
 * @TableName prediction_model_config
 */
@TableName(value ="prediction_model_config")
@Data
public class PredictionModelConfig {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 模型名称
     */
    private String modelName;

    /**
     * 默认历史数据月份数
     */
    private Integer defaultHistoryMonths;

    /**
     * 默认置信水平
     */
    private Integer defaultConfidenceLevel;

    /**
     * 是否进行季节调整(1:是,0:否)
     */
    private Integer seasonAdjustment;

    /**
     * 是否启用
     */
    private Integer isActive;

    /**
     * 
     */
    private Date updateTime;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PredictionModelConfig other = (PredictionModelConfig) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getModelName() == null ? other.getModelName() == null : this.getModelName().equals(other.getModelName()))
            && (this.getDefaultHistoryMonths() == null ? other.getDefaultHistoryMonths() == null : this.getDefaultHistoryMonths().equals(other.getDefaultHistoryMonths()))
            && (this.getDefaultConfidenceLevel() == null ? other.getDefaultConfidenceLevel() == null : this.getDefaultConfidenceLevel().equals(other.getDefaultConfidenceLevel()))
            && (this.getSeasonAdjustment() == null ? other.getSeasonAdjustment() == null : this.getSeasonAdjustment().equals(other.getSeasonAdjustment()))
            && (this.getIsActive() == null ? other.getIsActive() == null : this.getIsActive().equals(other.getIsActive()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getModelName() == null) ? 0 : getModelName().hashCode());
        result = prime * result + ((getDefaultHistoryMonths() == null) ? 0 : getDefaultHistoryMonths().hashCode());
        result = prime * result + ((getDefaultConfidenceLevel() == null) ? 0 : getDefaultConfidenceLevel().hashCode());
        result = prime * result + ((getSeasonAdjustment() == null) ? 0 : getSeasonAdjustment().hashCode());
        result = prime * result + ((getIsActive() == null) ? 0 : getIsActive().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", modelName=").append(modelName);
        sb.append(", defaultHistoryMonths=").append(defaultHistoryMonths);
        sb.append(", defaultConfidenceLevel=").append(defaultConfidenceLevel);
        sb.append(", seasonAdjustment=").append(seasonAdjustment);
        sb.append(", isActive=").append(isActive);
        sb.append(", updateTime=").append(updateTime);
        sb.append("]");
        return sb.toString();
    }
}